package com.iyundao.io.mapper;

import com.iyundao.io.model.ActivityModel;
import com.iyundao.io.tools.ActitvityShow;
import com.iyundao.io.tools.ActivityModelVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ActivityModelMapper {
    @Insert({
        "insert into activitymodel (id, activitytitle, ",
        "activitycontent, activitystarttime, ",
        "activityendtime, activitysignstarttime, ",
        "activitysignendtime, activitylongitude, ",
        "activitylatitude, activitysitename, ",
        "activitycreatetime, activitynumber, ",
        "activityjoinnumber, activityintegral, ",
        "activityimg, userid, ",
        "activityflag, activityid, ",
        "activitydigest, organizationid)",
        "values (#{id,jdbcType=INTEGER}, #{activitytitle,jdbcType=VARCHAR}, ",
        "#{activitycontent,jdbcType=VARCHAR}, #{activitystarttime,jdbcType=TIMESTAMP}, ",
        "#{activityendtime,jdbcType=TIMESTAMP}, #{activitysignstarttime,jdbcType=TIMESTAMP}, ",
        "#{activitysignendtime,jdbcType=TIMESTAMP}, #{activitylongitude,jdbcType=DOUBLE}, ",
        "#{activitylatitude,jdbcType=DOUBLE}, #{activitysitename,jdbcType=VARCHAR}, ",
        "#{activitycreatetime,jdbcType=TIMESTAMP}, #{activitynumber,jdbcType=INTEGER}, ",
        "#{activityjoinnumber,jdbcType=INTEGER}, #{activityintegral,jdbcType=INTEGER}, ",
        "#{activityimg,jdbcType=VARCHAR}, #{userid,jdbcType=VARCHAR}, ",
        "#{activityflag,jdbcType=INTEGER}, #{activityid,jdbcType=INTEGER}, ",
        "#{activitydigest,jdbcType=VARCHAR}, #{organizationid,jdbcType=VARCHAR})"
    })
    int insert(ActivityModel record);

    @InsertProvider(type=ActivityModelSqlProvider.class, method="insertSelective")
    int insertSelective(ActivityModel record);

}